/* 智能客服页面样式 */
@keyframes typing {
  0% {
    opacity: 0.3;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
}

/* 自定义滚动条 */
.ai-service-messages::-webkit-scrollbar {
  width: 6px;
}

.ai-service-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.ai-service-messages::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.ai-service-messages::-webkit-scrollbar-thumb:hover {
  background: #667eea;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .ai-service-container {
    border-radius: 0 !important;
  }

  .message-content {
    max-width: 85% !important;
  }

  .ai-service-header,
  .ai-service-input {
    padding: 12px 16px !important;
  }

  .ai-service-messages {
    padding: 16px 12px !important;
  }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
  .ai-service-container {
    background-color: #1a1a1a !important;
  }

  .ai-service-messages {
    background-color: #1a1a1a !important;
    background-image: none !important;
  }

  .message-wrapper.assistant .message-content {
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
  }

  .ai-service-input {
    background-color: #2d2d2d !important;
    border-top-color: #404040 !important;
  }

  .ai-service-input textarea {
    background-color: #3d3d3d !important;
    color: #e0e0e0 !important;
    border-color: #404040 !important;
  }
  @keyframes typing {
    0%, 60%, 100% {
      transform: translateY(0);
      opacity: 0.4;
    }
    30% {
      transform: translateY(-10px);
      opacity: 1;
    }
  }

  .typing-indicator div {
    animation-fill-mode: both;
  }

  /* 消息动画 */
  .message-content {
    animation: messageAppear 0.3s ease-out;
  }

  @keyframes messageAppear {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* 连接状态指示器 */
  .connection-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    transition: all 0.3s ease;
  }

  .connection-status.connected {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4caf50;
  }

  .connection-status.disconnected {
    background-color: rgba(244, 67, 54, 0.2);
    color: #f44336;
  }
}